/**
 * ProductionBuildingSequenceDecorator class definition
 */

#ifndef GROUND_ATTACK_SEQUENCE_DECORATOR_H_
#define GROUND_ATTACK_SEQUENCE_DECORATOR_H_

#include "BehaviorDecorator.h"


class GroundAttackSequenceDecorator : public BehaviorDecorator 
{
public:
	/**
	 * Creates a new instance of the ResetDecorator class
	 * @param incBehavior BaseBehavior* to decorate
	 */
	GroundAttackSequenceDecorator(BaseBehavior* incBehavior) :	BehaviorDecorator(incBehavior),
																lastGroundAttackFrame(-1),
																currentTargetBuilding(NULL),
																currentTargetTile(BWAPI::TilePositions::None)

	{}

	void Enter();
	
	void Exit();
	/**
	 * Check the decorated task's check condition + extra.
	 */
	bool CheckConditions();

private:
	int lastGroundAttackFrame;
	BWAPI::Unit* currentTargetBuilding;
	BWAPI::TilePosition currentTargetTile;

	bool findNearestEnemyBuilding();

};

#endif